#!/bin/bash

msg=$(date +%F,%T)

echo $* > out1

dir=`echo "$1" | awk -F / '{printf "%s",$(NF-1)}'`

file=`echo "$1" | awk -F / '{printf "%s",$(NF)}'`


git add "./md_pic/${dir}/${file}"

git commit -m "add image ${msg} ${dir}/${file}"

git push





echo "http://yuky11.gitee.io/pic/md_pic/${dir}/${file}"
